class Event {
  
  on(
      evt,fn){
    if(typeof this.#lisenters[evt]==='undefind'){
      this.lisenters[evt]=[];
    }
    this.#lisenters[evt].push(fn);
  }
  emit(evt,arg){
    const fns=this.#lisenters[evt];
    for(const fn of fns){
      fn();
    }
  }
#lisenters={
 /* 'bark':[fn1,fn2],
  'hello':[fn3,fn4]*/
};
}

module.exports=Event;
